using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;


namespace App1._
{
    /// <summary>
    /// Interaction logic for Window1.xaml
    /// </summary>
    public enum SexOpt { Male, Female };

    public partial class Window1 : System.Windows.Window
    {

        public Window1()
        {
            InitializeComponent();
            ObservableCollection<Member> memberData = new ObservableCollection<Member>();
            memberData.Add(new Member()
            {
                Name = "Joe",
                Age = "23",
                Sex = SexOpt.Male,
                Pass = true,
                ExamDate = new DateTime(2010, 4, 10),
                Email = new Uri("mailto:Joe@school.com")
            });
            memberData.Add(new Member()
            {
                Name = "Mike",
                Age = "20",
                Sex = SexOpt.Male,
                Pass = false,
                ExamDate = new DateTime(2010, 4, 10),
                Email = new Uri("mailto:Mike@school.com")
            });
            memberData.Add(new Member()
            {
                Name = "Lucy",
                Age = "25",
                Sex = SexOpt.Female,
                Pass = true,
                ExamDate = new DateTime(2010, 4, 10),
                Email = new Uri("mailto:Lucy@school.com")
            });

            dataGrid.ItemsSource = memberData;
        }
    }

    public class Member
    {
        public string Name { get; set; }
        public string Age { get; set; }
        public SexOpt Sex { get; set; }
        public bool Pass { get; set; }
        public DateTime ExamDate { get; set; }
        public Uri Email { get; set; }
    }
}